﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassLibrary
{
    public class People
    {
        public int ID { get; set; }

        public string Name { get; set; }

        public int Age { get; set; }

        public bool Sex { get; set; }

        /// <summary>
        /// 国籍
        /// </summary>
        public string Nationality { get; set; }

        public void Eat<T>(T tFood) where T : Food
        {
            Console.WriteLine("食物:{0},很好吃!", tFood.FoodName);
        }

        public void SayHi()
        {
            Console.WriteLine("{0}说 您好!", Name);
        }

    }
}
